package cn.hwadee.muying.mapper;

import cn.hwadee.muying.commons.page.MyPage;
import cn.hwadee.muying.dto.Worker;
import cn.hwadee.muying.entity.User;
import cn.hwadee.muying.entity.WorkerInfo;
import cn.hwadee.muying.enums.Education;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by Mankind on 2018/8/7.
 */
@Mapper
@Component(value = "WorkerMapper")
public interface WorkerMapper {

    List<Worker> list(@Param("page") MyPage<Worker> page,
                      @Param("cUser") User cUser,
                      @Param("entryStatus") Integer entryStatus,
                      @Param("workerLevel")Long workerLevel,
                      @Param("education")Long education,
                      @Param("keyword")String keyword) throws Exception;

    List<Worker> frontList(@Param("page") MyPage<Worker> page,
                           @Param("city") String city,
                           @Param("hometown")String hometown,
                           @Param("orgId")Long orgId,
                           @Param("levelId")Long levelId,
                           @Param("educationId")Long educationId,
                           @Param("startExperience")Integer startExperience,
                           @Param("endExperience")Integer endExperience,
                           @Param("startAge")Integer startAge,
                           @Param("endAge")Integer endAge,
                           @Param("startSalary")Integer startSalary,
                           @Param("endSalary")Integer endSalary) throws Exception;

    List<Worker> care(@Param("cUser") User cUser,@Param("keyword")String keyword) throws Exception;

    List<Worker> upgrade(@Param("cUser") User cUser,@Param("keyword")String keyword) throws Exception;

    List<Worker> status(@Param("page") MyPage<Worker> page, @Param("cUser") User cUser,@Param("workerLevel")Long workerLevel, @Param("education")Long education,@Param("free") Integer free,@Param("keyword")String keyword) throws Exception;

    List<Worker> selectFollowerList(@Param("orgId") Long orgId);

    List<Worker> selectListByRid(@Param("rid") Long rid);
}
